import { Account } from './account.entity'
import { Entity, PrimaryGeneratedColumn, OneToMany, Column } from 'typeorm'
import { Module } from '../../module/module.entity'

@Entity()
export class AccountGroup {
  @PrimaryGeneratedColumn()
  id: number

  @OneToMany(type => Account, account => account.group)
  accounts: Account[]

  @Column()
  title: string

  @OneToMany(type => Module, module => module.group)
  modules: Module[]
}
